//
// Created by 123 on 2025/1/3.
//
#include "iostream"
using namespace std;

class Base{
public:
    //包含纯虚函数的类叫抽象类，无法实例化，子类不重写虚函数也是抽象类
    virtual void func() = 0;
};

class Son : public Base{
public:
    virtual void func(){
        cout << "func invoke" << endl;
    }
};

int main089(){
    Base* base = NULL;
//    base = new Base;

    base = new Son;
    base->func();
    delete base;

    return 0;
}